Optimal. Leaf size=192 \[ -\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{d \left (a^2-b^2\right )^{7/2}}+\frac{5 a b \sec (c+d x)}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac{b \sec (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 d \left (a^2-b^2\right )^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.391201, antiderivative size = 192, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2694, 2864, 2866, 12, 2660, 618, 204} \[ -\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{d \left (a^2-b^2\right )^{7/2}}+\frac{5 a b \sec (c+d x)}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac{b \sec (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 d \left (a^2-b^2\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2694
Rule 2864
Rule 2866
Rule 12
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\sec ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\int \frac{\sec ^2(c+d x) (-2 a+3 b \sin (c+d x))}{(a+b \sin (c+d x))^2} \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}+\frac{\int \frac{\sec ^2(c+d x) \left (2 a^2+3 b^2-10 a b \sin (c+d x)\right )}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^2}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\int \frac{3 b^2 \left (4 a^2+b^2\right )}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^3}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\left (3 b^2 \left (4 a^2+b^2\right )\right ) \int \frac{1}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^3}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\left (3 b^2 \left (4 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{\left (a^2-b^2\right )^3 d}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}+\frac{\left (6 b^2 \left (4 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac{1}{2} (c+d x)\right )\right )}{\left (a^2-b^2\right )^3 d}\\ &=-\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{b+a \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2} d}+\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}\\ \end{align*}
Mathematica [A] time = 3.05529, size = 193, normalized size = 1.01 \[ \frac{-\frac{6 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2}}+\frac{b^3 \cos (c+d x) \left (-8 a^2-7 a b \sin (c+d x)+b^2\right )}{(a-b)^3 (a+b)^3 (a+b \sin (c+d x))^2}+\sin \left (\frac{1}{2} (c+d x)\right ) \left (\frac{2}{(a-b)^3 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}+\frac{2}{(a+b)^3 \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )}\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.092, size = 705, normalized size = 3.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 4.31216, size = 1983, normalized size = 10.33 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (c + d x \right )}}{\left (a + b \sin{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18032, size = 520, normalized size = 2.71 \begin{align*} -\frac{\frac{3 \,{\left (4 \, a^{2} b^{2} + b^{4}\right )}{\left (\pi \left \lfloor \frac{d x + c}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + b}{\sqrt{a^{2} - b^{2}}}\right )\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \sqrt{a^{2} - b^{2}}} + \frac{2 \,{\left (a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 3 \, a b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 \, a^{2} b - b^{3}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}} + \frac{9 \, a^{3} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, a b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 8 \, a^{4} b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 15 \, a^{2} b^{5} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 2 \, b^{7} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 23 \, a^{3} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, a b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 8 \, a^{4} b^{3} - a^{2} b^{5}}{{\left (a^{8} - 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} - a^{2} b^{6}\right )}{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a\right )}^{2}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]